<?php
/**
 * Created by 784855684@qq.com.
 * Link: https://github.com/lichtung/wshore
 * User: linzh
 * Date: 6/26/17
 * Time: 8:34 AM
 */
declare(strict_types=1);

const SECRET_KEY = 'thisissecretkey';

const WSC_SOCKET_HOST = '127.0.0.1';
const WSC_SOCKET_PORT = 1992;

return [
    'wshore.core.dao' => [
        WS_ADAPTER_CLASS => [
            'wshore\\core\\database\\MySQL',
        ],
        WS_ADAPTER_CONFIG => [
            [
                WS_DAO_DBNAME => 'ischema',
                WS_DAO_USERNAME => 'root',
                WS_DAO_PASSWORD => '123456',
                WS_DAO_HOST => '127.0.0.1',
                WS_DAO_PORT => 3306,
                WS_DAO_CHARSET => 'UTF8',
                WS_DAO_DSN => null,//默认先检查差DSN是否正确,直接写dsn而不设置其他的参数可以提高效率，也可以避免潜在的bug
                WS_DAO_OPTIONS => [
                    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,//默认异常模式
                    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,//结果集返回形式
                ],
            ],
        ],
    ],
];
